package cn.topevery.garden.dal.dao;

import cn.topevery.garden.entity.dto.ScheduleDTO;
import cn.topevery.garden.entity.po.Plan;
import cn.topevery.garden.entity.query.PlanQuery;
import cn.topevery.garden.entity.vo.PestAnalyzeVO;
import cn.topevery.garden.entity.vo.PlanVO;
import cn.topevery.garden.framework.base.BaseDao;
import hw.topevery.basis.entity.po.SysUser;
import hw.topevery.framework.db.entity.DataPager;

import java.util.List;
import java.util.Map;

/**
 * @author code-generate
 * @date 2022-01-05
 */
public interface PlanDao extends BaseDao<Plan> {


    /**
     * 获取列表
     *
     * @param query
     */
    DataPager<PlanVO> listPage(PlanQuery query);

    Plan getEntityByColumn(String key, String value);

    void commit(PlanVO vo, String userId);

    DataPager<PlanVO> getList(DataPager<PlanVO> page, Map<String, Object> map);

    void deleteByIds(String planId, String userId);

    List<Plan> getByName(String name);

    PlanVO getGroupByName(String name);

    List<Plan> getPestPlanList();

    void mainPlanApprove(String planId, String userId);

    boolean mainPlanConfirm(String planId, String userId);

    void subPlanExecute(PlanVO vo, String userId);

    List<PestAnalyzeVO> getPestDeptInfo(boolean isSum);

    List<PestAnalyzeVO> getPestAreaInfo(boolean isSum);

    List<Plan> getScheduleRecord(String uuid, Integer type);

    DataPager<PlanVO> getTreePlanList(PlanQuery query);

    void updateExecuteDate(ScheduleDTO dto);

    Plan getPlanInfo(Integer id);

    List<Map<String, Object>> planCount();

    DataPager<PlanVO> getSendPlanPage(PlanQuery query, SysUser user, List<String> receiveDeptIds);
}
